# coding=UTF-8

import sqlite3,subprocess,requests,json,os,time



# p = subprocess.Popen(['nc', '-l', '-p', '8585'],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
# output, err = p.communicate()

# # 输出短信内容
# if output:
# 	# print("短信内容:")
# 	# print(output.decode('utf-8'))
# 	nc=output.decode('utf-8')
# 	# print(sms_data)
# else:
# 	pass
r=os.system('nc -l -p 8585')
r=r.decode('utf-8')
while True:
	time.sleep(1)
	with open("data.txt","w") as d:
		d.write(r)	
print(nc)